﻿@page "/LensLogin"

<PageTitle>@AppInfo.CnName</PageTitle>

<div class="wrap">
    <div class="container">
        <section class="login-sidebox">
            <div class="login-sidebox-content">
                <div class="login-sidebox-header">
                    <div class="login-sidebox-logo">
                        <div class="logo"></div>
                        <span>@AppInfo.Name</span>
                    </div>
                    <h2 class="login-sidebox-subtitle">
                        @AppInfo.CnName
                    </h2>
                </div>
                <div class="login-sidebox-body">
                    <p>
                        @AppInfo.Description
                    </p>
                </div>
            </div>
        </section>
        <section class="login-form">
            <div class="login-form-header" style="justify-content:center;">
                <h2>系 统 登 录</h2>
            </div>
            <div class="form-signin">
                <div class="login-wrap">
                    <div class="login-up">
                        <BootstrapInputGroup>
                            <BootstrapInputGroupIcon Icon="fa-solid fa-fw fa-user" />
                            <BootstrapInput TValue="string" IsAutoFocus=true PlaceHolder="登录账号" @bind-Value=AppContext.LoginName
                                            name="userName" maxlength="16" title="登录账号不可为空" />
                            <Block Condition=@AppContext.IsDomain>
                                <BootstrapInputGroupLabel DisplayText=@StringAt />
                                <Select TValue=string title="登录的域" Items=@Domains @bind-Value=AppContext.LoginDomain />
                            </Block>
                        </BootstrapInputGroup>
                        <BootstrapInputGroup class="mt-3">
                            <BootstrapInputGroupIcon Icon="fa-solid fa-fw fa-lock" />
                            <BootstrapPassword PlaceHolder="登录密码" @bind-Value=AppContext.LoginPassword name="password" 
                            title="登录密码不可为空" OnEnterAsync=OnPasswordEnterAsync />
                        </BootstrapInputGroup>
                    </div>
                </div>
                <div class="d-flex justify-content-between align-items-center mt-4">
                    <Checkbox TValue=bool Color=Color.Primary ShowAfterLabel=true DisplayText="记住密码" @bind-Value=AppContext.IsRemember />
                    <Checkbox TValue=bool Color=Color.Primary ShowAfterLabel=true DisplayText="域账号登录" Id="IsRemember" @bind-Value=AppContext.IsDomain />
                </div>
                <Button Text="登 录" class="btn btn-login btn-lg btn-block" data-bs-toggle="tooltip" OnClick=OnLoginClickAsync />
            </div>
        </section>
    </div>
</div>